#ifndef __CARD_H__
#define __CARD_H__

#include <string>
#include <memory>
#include <vector>

#include "singleton.h"

class Card
{
public:
    typedef std::shared_ptr<Card> ptr;
    Card(std::string cardName, int weight, int color);
    std::string& GetCardName()
    {
        return m_cardName;
    }

    void SetCardName(std::string& name)
    {
        m_cardName = name;
    }

    int GetWeight()
    {
        return m_weight;
    }

    void SetWeight(int weight)
    {
        m_weight = weight;
    }

    int GetColor()
    {
        return m_color;
    }

    void SetColor(int color)
    {
        m_color = color;
    }

private:
    std::string m_cardName;
    int m_weight;
    int m_color;
};

class CardManager
{
public:
    CardManager();

    void InitCard();

    void Shuffle();

    Card::ptr DealCard();
private:
    std::vector<Card::ptr> m_cards;
};

typedef Singleton<CardManager> CardMgr;

#endif // !__CARD_H__
